package com.dhcc.sds.busi.dao;

import com.baomidou.mybatisplus.plugins.Page;
import com.dhcc.cdc.busi.entity.CdcEpisodeEntity;
import com.dhcc.core.framework.base.mapper.BaseMapper;
import com.dhcc.sds.busi.dto.AnalysisExclusionDto;
import com.dhcc.sds.busi.dto.AnalysisIndexDto;
import com.dhcc.sds.busi.dto.STEMIIndexStaDto;
import com.dhcc.sds.busi.entity.SdsQcincaseEntity;
import com.dhcc.sds.busi.vo.AnalysisSdsPortalVo;
import com.dhcc.sds.busi.vo.SdsOPQcincaseVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 病种入组病例
 * 
 * @ClassName: SdsQcincaseMapper
 * @Description: TODO
 * @author sunyingjie
 * @date 2021-03-22 10:09:15
 */
public interface SdsQcincaseMapper  extends BaseMapper<SdsQcincaseEntity> {
	
    List<SdsQcincaseEntity> list(@Param("map")Map<String, Object> map);
    List<SdsQcincaseEntity> page(@Param("page") Page<SdsQcincaseEntity> page,@Param("map")Map<String, Object> map);
    List<SdsQcincaseEntity> selectDelayReport(@Param("page")Page<SdsQcincaseEntity> page,@Param("map") Map<String, Object> map);
    List<SdsQcincaseEntity> selectMrlist(@Param("page") Page<SdsQcincaseEntity> page, @Param("map") Map<String, Object> map);
    List<AnalysisSdsPortalVo> selectPortalMrlist(@Param("params") Map<String, Object> params);


    List<String> selectYears();

    List<STEMIIndexStaDto> selectIndexDatas(@Param("params") Map<String, Object> params);

    List<Long> selectIndexNums(@Param("params") Map<String, Object> params);

    SdsQcincaseEntity getByEpisodeId(@Param("params") Map<String, Object> params);

    SdsQcincaseEntity getEntityByEpisodeId(@Param("episodeId") Long episodeId);

    SdsQcincaseEntity getByEpisodeIdAndEntityId(@Param("episodeId") Long episodeId, @Param("entityId") Long entityId);

    List<AnalysisIndexDto> selectAnalysisIndexDatas(@Param("params") Map<String, Object> params);

    List<SdsQcincaseEntity> getMrlistOfDept(@Param("map") Map<String, Object> map);

    int getMrlistOfDeptCount(@Param("map") Map<String, Object> map);


    List<Integer> selectPortalCount(@Param("params") Map<String, Object> params);


    List<Long> selectEntity();

    AnalysisSdsPortalVo selectCostsAndDays(@Param("entityId") Long entityId, @Param("params") Map<String, Object> params);

    List<AnalysisSdsPortalVo> selectARatioChartData(@Param("params") Map<String, Object> params);

    List<AnalysisSdsPortalVo> selectByStatus(@Param("entityId") Long entityId, @Param("status") List<String> status, @Param("params") Map<String, Object> params);

    List<AnalysisSdsPortalVo> selectMrInfoByIDs(@Param("incaseIds") List<Long> incaseIds);

    List<AnalysisSdsPortalVo> selectPortalCountDetails(@Param("formCheckType") String formCheckType, @Param("idName") String idName, @Param("deptIds")List<String> deptIds);

    List<AnalysisSdsPortalVo> selectByCondition(@Param("params") Map<String, Object> params,@Param("statusList") List<String> statusList);

    List<AnalysisSdsPortalVo> selectCostsAndDaysByDate(@Param("params") Map<String, Object> params);

    List<AnalysisSdsPortalVo> getIndexDataByDate(@Param("params") Map<String, Object> params);

    List<AnalysisSdsPortalVo> selectPortalCountDetailsList(@Param("formCheckType") String formCheckType, @Param("idName") String idName, @Param("deptIds")List<String> deptIds);

    List<AnalysisSdsPortalVo> selectByConditionList(@Param("params") Map<String, Object> params,@Param("statusList") List<String> statusList);

    List<AnalysisSdsPortalVo> getIndexListDataByDate(@Param("params") Map<String, Object> params);

    CdcEpisodeEntity selectEpisodeByIncaseId(@Param("incaseId") Long incaseId);

    List<Long> selectIncaseIdsByCondition(@Param("params")Map<String, Object> params, @Param("statusList")List<String> statusList);

    List<SdsOPQcincaseVo> selectOPIncaseByCondition(@Param("params") Map<String, Object> params);

    List<SdsOPQcincaseVo> selectOPIncaseByRegNo(@Param("incaseIds") List<Long> incaseIds);

    List<SdsQcincaseEntity> selectMrList(@Param("params") Map<String, Object> params);

    List<SdsQcincaseEntity> selectOPByDimData(@Param("dimDataId") Long dimDataId, @Param("admTypeId") Long admTypeId);

    Long getEntityIdByEpisodeId(@Param("episodeId") Long episodeId);

    List<Long> selectEntityByTime(@Param("map") Map<String, Object> params);

    List<SdsQcincaseEntity> getContraindicationByAdmStatus(@Param("id") Long id);

    int getDelayReportCount(@Param("params") Map<String, Object> params);

    Map<String, Object> mrlistInfo(@Param("params") Map<String, Object> params);
	
	List<AnalysisExclusionDto> selectSdsExclusionTable(@Param("params") Map<String, Object> params);

    List<AnalysisExclusionDto> selectSdsExclusionTable(@Param("page") Page<AnalysisExclusionDto> page, @Param("params") Map<String, Object> params);

    List<AnalysisSdsPortalVo> getMonthIds(@Param("params") Map<String, Object> params);
}
